/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject.games;

import java.util.Collection;

import org.ceroproject.Sortable;


/**
 * Represents the minimal properties of a zone
 * 
 * @author Telem
 */
public interface Zone extends Sortable<Card>, Iterable<Card> {

	/**
	 * Adds a card to the zone. In most cases, it is better to use the moveCard
	 * function, however.
	 * 
	 * @param card
	 *            the card to add to the zone
	 */
	void addCard(Card card);

	/**
	 * Removes a card from the zone. In most cases, it is better to use the
	 * moveCard function, however.
	 * 
	 * @param card
	 *            the card to remove from the zone
	 */
	boolean deleteCard(Card card);

	/**
	 * Moves a card from the current zone to another
	 * 
	 * @param card
	 *            The card to move
	 * @param to
	 *            The destination zone
	 */
	void moveCard(Card card, Zone to);

	/**
	 * Moves all this zone's cards to the zone 'to'
	 * 
	 * @param to
	 *            The zone to move the cards to
	 */
	void moveCards(Zone to);

	/**
	 * Moves all this zone's cards to the zone 'to'
	 * 
	 * @param cards
	 *            the cards to move from this zone to another
	 * @param to
	 *            The zone to move the cards to
	 */
	void moveCards(Collection<Card> cards, Zone to);
	
	/**
	 * Adds a Zone Listener
	 * 
	 * @param zoneListener listener to add
	 */
	void addZoneListener(ZoneListener zoneListener);

	/**
	 * Removes a Zone Listener
	 * 
	 * @param zoneListener listener to remove
	 */
	void removeZoneListener(ZoneListener zoneListener);
	
	/**
	 * Returns the name of the zone
	 * 
	 * @return the name of the zone
	 */
	String getName();

	/**
	 * Returns the number of cards in the zone
	 * 
	 * @return the number of cards in the zone
	 */
	int getCardCount();
	
	public String toString();
}
